package com.wangp.model.handler;

import java.util.Map;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
public class TestController {
	
	@RequestMapping("/hello")
	public String hello(){
		return "hello";
	}
	
	@RequestMapping("/testmyview")
	public String testMyView(Map<String,Object> map){
		map.put("name", "张三");
		return "myview";
	}
	
	@RequestMapping("/testexcel")
	public String testExcel(Map<String,Object> map){
		String sheetName = "用车统计表单";
		String titleName = "用车申请数据统计表";
		String fileName = "用车申请统计表单";
		int columnNumber = 3;
		int[] columnWidth = { 10, 20, 30 };
		String[][] dataList = { { "001", "2015-01-01", "IT" },
				{ "002", "2015-01-02", "市场部" }, { "003", "2015-01-03", "测试" } };
		String[] columnName = { "单号", "申请时间", "申请部门" };
		map.put("sheetName", sheetName);
		map.put("titleName", titleName);
		map.put("fileName", fileName);
		map.put("columnNumber", columnNumber);
		map.put("columnWidth", columnWidth);
		map.put("dataList", dataList);
		map.put("columnName", columnName);
		
		return "myexcel";
	}
	
	
	
}
